import {createRouter, createWebHashHistory} from "vue-router";
import Layout from '@/layout/Index.vue';

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Layout,
        children: [
            {
                path: '404',
                name: 'NotFound',
                component: () => import("@/views/error/404.vue")
            },
            {
                path: '',
                name: 'App',
                component: () => import("@/views/app/Index.vue"),
            },
            {
                path: "accounting-balance",
                name: "AccountingBalance",
                component: () => import("@/views/app/AccountBalance/AccountBalanceBody.vue")
            },
            {
                path: "income-detail",
                name: "IncomeDetail",
                component: () => import("@/views/app/IncomeDetail/IncomeDetailBody.vue")
            }
        ]
    },
    {
        path: "/:pathMatch(.*)*",
        name: "404",
        redirect: '/404',
        component: () => import("@/views/error/404.vue")
    }
];

const router = createRouter({
    history: createWebHashHistory(),
    routes
});

export default router